package com.hadoop.hdfsclientdemo.rpc.server;

import com.hadoop.hdfsclientdemo.rpc.ILogin;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.ipc.RPC;
import org.apache.hadoop.ipc.RPC.Builder;
import org.apache.hadoop.ipc.RPC.Server;

public class ServicePublisher {
	
	public static void main(String[] args) throws Exception {
		
		Configuration conf = new Configuration();
		Builder builder = new RPC.Builder(conf);
		
		builder.setBindAddress("localhost")
		.setPort(10000)
		.setProtocol(ILogin .class)
		.setInstance(new LoginImpl());
		
		Server server = builder.build();
		server.start();
		
		
		
	}
	
	

}
